Video communications method and apparatus, terminal, and computer-readable storage medium

ABSTRACT

A video communications method is provided, including: respectively displaying video images of at least two terminals in at least two display subareas of a video communication interface in a video chat session of the at least two terminal; obtaining a first special effect display instruction; and adding a first special effect to the at least two display subareas based on the first special effect display instruction. The method also includes transmitting the first special effect display instruction to a second terminal of the at least two terminals, the second terminal being an action recipient of the first special effect; and selecting, among multiple end special effects, a target end special effect to be added to the video images of the at least two terminals according to a body action occurred in the video image of the second terminal.

CROSS-REFERENCES TO RELATED APPLICATIONS

This application is a continuation application of PCT Patent ApplicationNo. PCT/CN2018/097177, filed on Jul. 26, 2018, which claims priority toPatent Application No. 201710656897.7, filed on Aug. 3, 2017 andentitled “VIDEO COMMUNICATIONS METHOD AND APPARATUS, TERMINAL, ANDCOMPUTER-READABLE STORAGE MEDIUM”.

FIELD OF TECHNOLOGY

This application relates to the field of network technologies, and inparticular, to a video communications method and apparatus, a terminal,and a computer-readable storage medium.

BACKGROUND OF THE DISCLOSURE

With developments of communication technologies, video communicationgradually becomes a common communication means. A social applicationinstalled in a terminal is usually provided with a video communicationor video chat function, and a user can perform video communication witha friend user through the social application, so that informationexchange between users is facilitated, and authenticity of informationexchange is improved.

In existing technology, in a case that a first terminal performs videocommunication with a second terminal, the first terminal records andtransmits first video data to the second terminal. The first terminalreceives second video data transmitted by the second terminal, anddisplays video images corresponding to the first video data and thesecond video data through a display manner of big and small pictures,such as displaying a video image of the second video data in full screenin a current screen, and displaying a video image of the first videodata in a small size in a rectangular area in an upper right corner ofthe current screen.

In the foregoing method, when interaction is performed between a firstuser and a second user, one user is limited by a size of a pictureoccupied by the other user in the current screen. Because of thelimitation of pictures, in a case that a special effect needs to beadded, the special effect can only be added to the video image occupyingthe bigger picture, which lacks a sense of interaction, wastes networkresources of video communication, and greatly reduces actual efficiencyof video communication.

SUMMARY

To resolve the problem in the related art, embodiments of thisapplication provide a video communications method and apparatus, aterminal, and a computer-readable storage medium. The technicalsolutions are as follows:

According to a first aspect, a video communications method is provided.The method is applied to a first terminal and includes: respectivelydisplaying video images of at least two terminals in at least twodisplay subareas of a video communication interface in a video chatsession of the at least two terminals. The at least two terminalsincludes the first terminal, and each display subarea displays a videoimage from one of the at least two terminals. The method also includes:obtaining a first special effect display instruction; adding a firstspecial effect to the at least two display subareas based on the firstspecial effect display instruction; transmitting the first specialeffect display instruction to a second terminal of the at least twoterminals, the second terminal being an action recipient of the firstspecial effect; and selecting, among multiple end special effects, atarget end special effect to be added to the video images of the atleast two terminals according to a body action occurred in the videoimage of the second terminal. The multiple end special effects indicatedifferent action results of the first special effect corresponding todifferent body actions.

According to a second aspect, a first terminal is provided. The terminalincludes a processor and a memory, the memory storing at least oneinstruction, and the instruction being loaded and executed by theprocessor to perform: respectively displaying video images of at leasttwo terminals in at least two display subareas of a video communicationinterface in a video chat session of the at least two terminal. The atleast two terminals includes the first terminal, and each displaysubarea displays a video image from one of the at least two terminals.The processor is also configured to perform: obtaining a first specialeffect display instruction; adding a first special effect to the atleast two display subareas based on the first special effect displayinstruction; transmitting the first special effect display instructionto a second terminal of the at least two terminals, the second terminalbeing an action recipient of the first special effect; and selecting,among multiple end special effects, a target end special effect to beadded to the video images of the at least two terminals according to abody action occurred in the video image of the second terminal. Themultiple end special effects indicate different action results of thefirst special effect corresponding to different body actions.

According to a third aspect, a non-transitory computer-readable storagemedium is provided. The computer-readable storage medium stores at leastone instruction, the instruction being loaded and executed by aprocessor of a first terminal to perform respectively displaying videoimages of at least two terminals in at least two display subareas of avideo communication interface in a video chat session of the at leasttwo terminal. The at least two terminals includes the first terminal,and each display subarea displays a video image from one of the at leasttwo terminals. The instruction further cause the processor to perform:obtaining a first special effect display instruction; adding a firstspecial effect to the at least two display subareas based on the firstspecial effect display instruction; transmitting the first specialeffect display instruction to a second terminal of the at least twoterminals, the second terminal being an action recipient of the firstspecial effect; and selecting, among multiple end special effects, atarget end special effect to be added to the video images of the atleast two terminals according to a body action occurred in the videoimage of the second terminal. The multiple end special effects indicatedifferent action results of the first special effect corresponding todifferent body actions.

BRIEF DESCRIPTION OF THE DRAWINGS

To describe the technical solutions in the embodiments of thisapplication more clearly, the following briefly describes theaccompanying drawings required for describing the embodiments.Apparently, the accompanying drawings in the following description showmerely some embodiments of this application, and a person of ordinaryskill in the art may still derive other drawings from these accompanyingdrawings without creative efforts.

FIG. 1 is a schematic diagram of an implementation environment accordingto an embodiment of this application.

FIG. 2A is a schematic diagram of a split-screen display manneraccording to an embodiment of this application.

FIG. 2B is a schematic diagram of a split-screen display manneraccording to an embodiment of this application.

FIG. 2C is a schematic diagram of a split-screen display manneraccording to an embodiment of this application.

FIG. 3 is a flowchart of a video communications method according to anembodiment of this application.

FIG. 4 is a schematic diagram of a split-screen display manner accordingto an embodiment of this application.

FIG. 5 is a schematic diagram of a pendant special effect according toan embodiment of this application.

FIG. 6 is a schematic diagram of a cross-subarea special effectaccording to an embodiment of this application.

FIG. 7 is a logical flowchart of a cross-subarea special effectaccording to an embodiment of this application.

FIG. 8 is a schematic structural diagram of a video communicationsapparatus according to an embodiment of this application.

FIG. 9 is a schematic structural diagram of a terminal according to anembodiment of this application.

DESCRIPTION OF EMBODIMENTS

The following clearly and completely describes the technical solutionsin the embodiments of this application with reference to theaccompanying drawings in the embodiments of this application.Apparently, the described embodiments are some embodiments of thisapplication rather than all of the embodiments. All other embodimentsobtained by a person of ordinary skill in the art based on theembodiments of this application without creative efforts shall fallwithin the protection scope of this application.

FIG. 1 is a schematic diagram of an implementation environment accordingto an embodiment of this application. The implementation environmentincludes: a first terminal 101, and at least one second terminal 102performing video communication with the first terminal. In a video chatsession of the first terminal 101 and the at least one second terminal102, the first terminal 101 transmits a video image of the firstterminal 101 to the at least one second terminal 102, receives a videoimage of the second terminal 102 transmitted by the at least one secondterminal 102, and displays the video image of the first terminal 101 andthe video image of the at least one second terminal 102 through asplit-screen display manner in a video communication interface. Thesplit-screen display manner includes: the first terminal 101respectively displays video images of at least two terminals in at leasttwo display subareas of the video communication interface, the displaysubareas being not overlapped. In some embodiments, the at least twodisplay subareas have substantially the same size. The first terminal101 respectively displays the video images of the at least two terminalsin the at least two display subareas according to shapes and sizes ofthe at least two display subareas in the video communication interface.

Taking that the first terminal 101 performs video communication with onesecond terminal 102 as an example, as shown in FIG. 2A, a videocommunication interface of the first terminal 101 includes tworectangular display subareas with the same size that are arranged sideby side from left to right, the video image of the first terminal 101and the video image of the second terminal 102 being respectivelydisplayed in the two rectangular display subareas. Alternatively, thevideo communication interface of the first terminal 101 includesrectangular display subareas with the same size that are arranged sideby side vertically, the video image of the first terminal 101 and thevideo image of the second terminal 102 being respectively displayed inthe rectangular display subareas. Certainly, subareas that display thevideo images of the terminals can be specifically adjusted by a terminaluser according to a using habit of the terminal user. Taking that thefirst terminal 101 performs video communication with two secondterminals 102 as an example, as shown in FIG. 2B, an upper half area ofthe video communication interface of the first terminal 101 includes tworectangular display subareas with the same size that are arranged sideby side, and a lower half area includes one rectangular display subarea.The video image of the first terminal 101 and video images of the twosecond terminals 102 are respectively displayed in the three rectangulardisplay subareas obtained through division. Alternatively, the videocommunication interface of the first terminal 101 includes threerectangular display subareas with the same size that are arranged sideby side transversely, the video image of the first terminal 101 and thevideo images of the two second terminals 102 being respectivelydisplayed in the three rectangular display subareas. Certainly, in thevideo chat session, subareas that display the video images of theterminals can be specifically adjusted by a terminal user according to ausing habit of the terminal user. Taking that the first terminal 101performs video communication with four second terminals 102 as anexample, as shown in FIG. 2C, the video communication interface of thefirst terminal 101 can display the display subareas in a manner ofmodular window display. Actually, in a case that the display subareasare displayed in the manner of modular window display, the displaysubareas can be not overlapped. The video communication interfaceincludes a rectangular display subarea located in a center area and fourpolygonal display subareas surrounding the center area. In the fivedisplay subareas obtained through division, the video image of the firstterminal 101 and the video images of the four second terminals 102 arerespectively displayed. Certainly, in the video chat session, subareasthat display the video images of the terminals can be specificallyadjusted by a terminal user according to a using habit of the terminaluser.

Special effects related in one embodiment of this application include apendant special effect and a cross-subarea special effect. The pendantspecial effect is a special effect displayed based on facialcoordinates, for example, the pendant special effect displays big redlips on a mouth of a video image based on a mouth location of the facialcoordinates, or displays cat ears over a head based on a head locationof the facial coordinates. The pendant special effect in one embodimentof this application is a special effect for the video images of the atleast two display subareas, that is, a special effect that is added forthe video images of the at least two display subareas at the same time.For example, in a case that two terminals perform video communication, apendant special effect option can be provided, the pendant specialeffect option corresponding to at least two included pendant specialeffects, one pendant special effect being a cat model and anotherpendant special effect being a dog model. In a case that the firstterminal chooses to add the pendant special effect, cat ears and a catnose can be added for a face in a first display subarea, and dog earsand a dog nose can be added for a face in a second display subarea. Theaddition of the special effect can actually be a procedure of adding alayer on the displayed video image and performing drawing based onobtained special effect parameters. The special effect parametersinclude, but are not limited to line parameters, color parameters,moving track parameters, and the like.

The interaction between the first terminal 101 and the at least onesecond terminal 102 is actually performed through a server, and theserver serves as a relay of video data and instructions. In thisembodiment of this application, to simplify an interaction procedurebetween the first terminal 101 and the at least one second terminal 102,a procedure related to the server in the interaction procedure is notspecifically described again.

For ease of understanding of principles of this application, in anembodiment of this application, only the performing video communicationbetween two terminals is used as an example for description. FIG. 3 is aflowchart of a video communications method according to an embodiment ofthis application. Referring to FIG. 3, the method includes the followingsteps:

301: A first terminal obtains a split-screen display instructiontriggered in the first terminal.

The split-screen display instruction is used for instructing the firstterminal to display video images of two terminals in a manner ofsplit-screen display. In one embodiment of the present disclosure, thespecific manner of split-screen display is: dividing the videocommunication interface into two rectangular display subareas with thesame size that are arranged side by side from left to right, and each ofthe display subareas is used for displaying a video image of aparticipating terminal in video communication.

The foregoing procedure of obtaining the split-screen displayinstruction is described by using an example that the first terminaltriggers the split-screen display instruction though an operation in thecurrent terminal. A specific triggering manner includes: in a video chatsession of the first terminal and a second terminal, the first terminaldisplays a split-screen button on the video communication interface, andin a case that the first terminal detects that the split-screen buttonis triggered, the first terminal generates the split-screen displayinstruction, so that the first terminal obtains the split-screen displayinstruction of the first terminal. Further, to enable the participatingterminals of video communication to maintain a consistent displayeffect, after obtaining the split-screen display instruction of thefirst terminal, the first terminal transmits the split-screen displayinstruction to the second terminal, the split-screen display instructiontransmitted by the first terminal to the second terminal being used forinstructing the second terminal to display the video image of the firstterminal and a video image of the second terminal through a manner ofsplit-screen display. In a case that the second terminal receives thesplit-screen display instruction, split-screen display can be performed.

Certainly, a manner of obtaining the split-screen display instructioncan further include that the second terminal initiates screen splitting,and the first terminal receives a split-screen display instructiontransmitted by the second terminal. In the video chat session of thefirst terminal and the second terminal, in a case that the secondterminal detects that a split-screen button of a video communicationinterface of the second terminal is triggered, the second terminalgenerates the split-screen display instruction. In addition, the secondterminal transmits the split-screen display instruction to the firstterminal, and the first terminal receives the split-screen displayinstruction transmitted by the second terminal.

The split-screen display instruction may be an instruction jointlytriggered by an interaction special effect button and the split-screenbutton. A specific procedure is: after opening the video communicationinterface, the first terminal displays an interaction special effectbutton in the video communication interface, and in a case that thefirst terminal detects that the interaction special effect button istriggered, the first terminal displays a plurality of special effectbuttons, and displays a split-screen display button used for triggeringthe split-screen display instruction. In a case that the first terminaldetects that the split-screen display button is triggered, the firstterminal obtains the split-screen display instruction. Certainly, thesplit-screen display instruction may be further an instruction directlytriggered by the split-screen button. A specific procedure includes: thefirst terminal directly displays the split-screen button in the videocommunication interface, and in a case that the first terminal detectsthat the split-screen button is triggered, the first terminal obtainsthe split-screen display instruction.

Which specifically initiates screen splitting is not specificallylimited in this embodiment of this application. Certainly, in oneembodiment of this application, descriptions are performed by taking anexample that a display manner is switched into split-screen display inthe video chat session, and in an actual scenario, in a case that thevideo chat session is triggered, the video chat session can be performedby directly using split-screen display without a conversion operation.For example, in a case that video communication is initiated, theterminal user can directly select the display manner used in videocommunication, thereby initiating corresponding video communication.Further, the split-screen display instruction may be further used forindicating how to specifically perform screen splitting on the videocommunication interface, and in a case that the first terminal receivesthe split-screen display instruction, the first terminal can performsplit-screen display based on different indicated screen splittingmanners.

Certainly, for the second terminal, in a case that the first terminalinitiates split-screen display, but a user of the second terminal doesnot intend to perform split-screen display, the display manner can beswitched back to the display manner of big and small pictures (e.g.,unevenly-sized pictures, for example, one video image is displayed infull screen, and another video image is displayed overlapping a subareaof the full screen) through an operation of the user after screensplitting, or, in a case that the second terminal receives thesplit-screen display instruction of the first terminal, a selectionoption can be displayed, the selection option being used for promptingthe user of the second terminal to determine whether to switch to asplit-screen display manner. In a case that the second terminal detectsthat the user chooses to perform no switching, switching is notperformed, and in a case that the user chooses to perform switching, asubsequent split-screen display procedure is performed.

302: The first terminal respectively displays video images of the firstterminal and a second terminal in two display subareas of a videocommunication interface in a video chat session of the first terminaland the second terminal. Each display subarea is configured to display avideo image from one of the two terminals.

In a case that the split-screen display instruction is received, thefirst terminal can divide the video communication interface according tothe split-screen display manner indicated by the split-screen displayinstruction, to obtain two display subareas. The two display subareasare not overlapped, and video data decoding is performed on originalvideo data of the first terminal and original video data of the secondterminal according to shapes and sizes of the two display subareas, toobtain video images matching the two display subareas. A video image ofthe first terminal (e.g., obtained by decoding a video data or obtainedfrom an embedded camera) is displayed in a first display subarea, and avideo image of the second terminal (e.g., obtained by decoding a videodata transmitted from the second terminal or from a server) is displayedin a second display subarea. In the foregoing procedure, descriptionsare performed by taking an example that the video images are adjusted byadjusting decoding parameters, and in an actual scenario, the videoimages obtained by decoding may be adjusted based on an originaldecoding manner. For example, a length and a width of a video image iscropped or stretched according to the same proportion, to obtain videoimages matching two display subareas, so that the video images in thedisplay subareas match an actual face of a user in proportion.Certainly, an adjustment manner that is specifically used is not limitedin this embodiment of this application.

In one embodiment of this application, arrangement manners, shapes andsizes of the first display subarea and the second display subarea in thevideo communication interface may be preset by a system, or may be setand modified based on a user requirement. This is not specificallylimited in this embodiment of this application. For example, the firstdisplay subarea and the second display subarea can be two rectangulardisplay subareas with the same size that are arranged side by side inthe video communication interface, or two rectangular display subareaswith the same size that are arranged vertically in the videocommunication interface. A screen layout of equally dividing a screenfrom left to right can provide the user with a psychological sense ofcompany of “being together”, and in addition, bring more possibilitiesto an idea of left and right cross-screen interaction. Alternatively,the first display subarea and the second display subarea can be tworectangular display subareas that are arranged side by side in the videocommunication interface, a proportion of sizes of the display subareasin the video communication interface being 3:2, and the like. Forexample, as shown in FIG. 4, the first terminal respectively displaysthe video image of the first terminal and the video image of the secondterminal in two rectangular display subareas with the same size that arearranged side by side in the video communication interface. The videoimages of the two terminals are displayed through the split-screendisplay manner, so that the user can see the face in the video imagemore clearly, thereby improving a user experience in videocommunication.

303: The first terminal obtains a first special effect displayinstruction, the first special effect display instruction being used forinstructing to add a first special effect to the two display subareas.

In the foregoing procedure of obtaining the first special effect displayinstruction, the first special effect display instruction may beobtained by triggering the video communication interface by the user. Inthis step, the first terminal can display a plurality of special effectbuttons in the video communication interface, the special effect buttonscorresponding to different special effects, so that the user can triggerthe first special effect display instruction through an operation oftriggering any one of the special effect buttons, to add a correspondingspecial effect. The procedure relates to a manual operation of the useron the video communication interface, and a specific procedure may be asfollows:

The plurality of special effect buttons may include a plurality ofpendant special effect buttons and a plurality of cross-subarea specialeffect buttons. In a case that the first terminal detects that a pendantspecial effect button is triggered, the first terminal obtains a pendantspecial effect instruction corresponding to the pendant special effectbutton, the pendant special effect instruction being used forinstructing the first terminal to add the pendant special effect for thetwo display subareas; and in a case that the first terminal detects thata cross-subarea special effect button is triggered, the first terminalobtains a cross-subarea special effect instruction corresponding to thecross-subarea special effect button, the cross-subarea special effectinstruction being used for instructing the first terminal to add across-subarea special effect for the two display subareas.

In the foregoing procedure of obtaining the first special effect displayinstruction, the first special effect display instruction may beobtained by triggering by a gesture operation or an emotion change ofthe user. In this step, the first terminal may further trigger the firstspecial effect display instruction through a specified gesture or aspecified emotion in the video images of the two terminals.

Taking the gesture operation as an example, a step that the firstterminal obtains the first special effect display instruction can be: ina case that the first terminal detects that there is the specifiedgesture in both video images displayed in the two display subareas, thefirst terminal obtains a gesture special effect instructioncorresponding to the specified gesture, the gesture special effectinstruction being used for instructing to add a special effectcorresponding to the specified gesture for the video images displayed inthe two display subareas. In this step, the first terminal identifies agesture operation in the video image of the first terminal and a gestureoperation in the video image of the second terminal through a firstpreset identification algorithm, and determines whether the two gestureoperations are the specified gesture. In a case that the two gestureoperations are the specified gesture, the first terminal obtains thegesture special effect instruction corresponding to the specifiedgesture; otherwise, the first terminal does not obtain any gesturespecial effect instruction.

The first terminal may preset and store a track parameter and a shapeparameter of the specified gesture, the track parameter and the shapeparameter of the specified gesture can be set and modified based on auser requirement. This is not specifically limited in this embodiment ofthis application. For example, the specified gesture can be aheart-shaped gesture formed by a hand heart in the video image of thefirst terminal and the video image of the second terminal, that is, in acase that the first terminal detects that the heart-shaped gesture isperformed by both parties in a call in the video images, the firstterminal determines that the specified gesture is detected, and triggersthe first special effect display instruction, to add a correspondingspecial effect to the two display subareas.

Taking the emotion change as an example, a step that the first terminalobtains the first special effect display instruction can be: in a casethat the first terminal detects that there is the specified emotion inany one of the video images displayed in the two display subareas, thefirst terminal obtains an emotion special effect instructioncorresponding to the specified emotion, the emotion special effectinstruction corresponding to the specified emotion being used forinstructing to add a special effect corresponding to the specifiedemotion for the video images displayed in the two display subareas. Inthis step, the first terminal obtains an emotion feature correspondingto the specified emotion, extracts a plurality of emotion features infaces in the video image of the first terminal and the video image ofthe second terminal through a second preset identification algorithm,and determines whether there is the specified emotion in the facesaccording to the plurality of emotion features and the emotion featurecorresponding to the specified emotion. In a case that there is thespecified emotion in the faces, the first terminal obtains the emotionspecial effect instruction corresponding to the specified emotion;otherwise, the first terminal does not obtain any emotion special effectinstruction.

The first terminal may preset and store the emotion featurecorresponding to the specified emotion. The specified emotion may be setand modified based on a user requirement. This is not specificallylimited in this embodiment of this application. For example, thespecified emotion may be a facial emotion corresponding to an action of“Muah” (e.g., kissing). The first preset identification algorithm andthe second preset identification algorithm can be set and modified basedon a user requirement. This is not specifically limited in thisembodiment of this application. For example, the first presetidentification algorithm can be an image identification algorithm basedon standard pixels, and the second preset identification algorithm canbe a feature extraction algorithm.

Controlling addition of special effects through changes of gestures oremotions can provide a more convenient operation manner, in which theuser does not need to perform triggering manually, thereby greatlyimproving operating efficiency.

The first special effect display instruction may be further a voiceinstruction given by the user, that is, the user may instruct theterminal to add the special effect through a manner of speaking. Forexample, the first terminal may detect the first special effect displayinstruction in a form of a voice instruction through a microphone, andcontinue to perform step 304 and subsequent steps. Controlling additionof special effects through the voice instruction can provide a moreconvenient operation manner, in which the user does not need to performtriggering manually, thereby greatly improving operating efficiency.

Different special effects can be provided for different split-screendisplay manners. For example, for the scenario of performing displayfrom left to right in one embodiment of this application, a two-personpendant special effect or a cross-subarea special effect crossing twodisplay subareas can be provided. If display is performed in foursquares in a four-person call scenario, a four-person pendant specialeffect or a cross-subarea special effect crossing four display subareasor a cross-subarea special effect crossing two display subareas can beprovided.

Specifically, when a split-screen display instruction is received, aspecial effect button corresponding to the screen splitting manner canbe obtained when screen splitting is performed according to thesplit-screen display instruction, and the special effect button can bedisplayed in the video communication interface of split-screen display.

304: The first terminal transmits the first special effect displayinstruction to the second terminal.

In one embodiment of this application, to make the participatingterminals of video communication consistent, after receiving the firstspecial effect display instruction, the first terminal transmits thefirst special effect display instruction to the second terminal. Afterreceiving the first special effect display instruction, the secondterminal then adds a first special effect corresponding to the firstspecial effect display instruction for the video communication interfaceof the second terminal according to the first special effect displayinstruction. A specific procedure of adding, by the second terminal, thespecial effect based on the instruction is the same as that of the firstterminal, which is not described herein again. Certainly, to provide amore flexible interaction manner, and prevent blocking caused by theaddition of the special effect, the added special effect can be furthercanceled. The cancelation can be initiated by any one of theparticipating terminals of video communication. For example, after thefirst terminal has added a special effect, when the special effectbutton is pressed again, a special effect cancelation instruction istriggered. Then the first terminal can cancel the added special effect,and transmit the special effect cancelation instruction to the secondterminal, so that the second terminal also cancels the added specialeffect.

In one embodiment of this application, when the first special effectdisplay instruction is obtained, the first special effect displayinstruction can be transmitted to the second terminal when the firstterminal adds the special effect based on the first special effectdisplay instruction. Certainly, to improve consistency of videocommunication, the first special effect display instruction can betransmitted to the second terminal as soon as the first special effectdisplay instruction is obtained, to prevent a delay time from being toolong.

In one embodiment of this application, the special effect instructionscan be classified into a pendant special effect instruction and across-subarea special effect instruction, respectively used forinstructing to add a pendant special effect and a cross-subarea specialeffect. When the first special effect display instruction is the pendantspecial effect instruction, the first special effect is the pendantspecial effect, and correspondingly, the step that the first terminaladds the pendant special effect for the two display subareas can beimplemented through the following step 305 to step 307.

305: The first terminal obtains two pendant special effectscorresponding to the pendant special effect instruction according to thependant special effect instruction.

The pendant special effect instruction is used for instructing the firstterminal to add a pendant special effect for each of the video images ofthe two terminals in the video communication interface. Therefore, eachpendant special effect instruction corresponds to two pendant specialeffects. In one embodiment of this application, each pendant specialeffect instruction corresponds to two pendant special effects, includinga first pendant special effect of the video image of the first terminaland a second pendant special effect of the video image of the secondterminal.

In this step, the first terminal locally pre-stores a plurality ofcorrespondences between the pendant special effect instructions and thependant special effects. Therefore, this step may be: obtaining, by thefirst terminal, the first pendant special effect and the second pendantspecial effect corresponding to the pendant special effect instructionfrom the plurality of correspondences between the pendant special effectinstructions and the pendant special effects according to the pendantspecial effect instruction. In one embodiment of this application, eachof the first pendant special effect and the second pendant specialeffect can be a set of a group of sub-pendants, and each sub-pendant maybe a pendant matching an organ on the face. By adding the first pendantspecial effect and the second pendant special effect to the videoimages, a more vivid visual effect of the video image of the twoterminals can be achieved, so that fun of video communication can beenriched, thereby meeting a more personalized user experience of theuser.

The first terminal may download specific special effect parameterscorresponding to the pendant special effects when a pendant specialeffect function is used for the first time, so that when the specialeffect is added, the special effect parameters can be directly obtainedlocally from the terminal to add the special effect, thereby increasingan adding speed. Certainly, when using the pendant special effectfunction, the first terminal may further download only icons of thependant special effects. Only when a selection operation of the user onany one special effect icon is detected, a special effect parameter ofthe selected pendant special effect is downloaded, to avoid a waste oftraffics and storage spaces.

Because the pendant special effect needs to be added to a correspondinglocation on the face in the video image, the first terminal furtherneeds to first obtain a facial coordinate through the following step306, and then add the pendant special effect based on the facialcoordinate through the following step 307.

306: The first terminal obtains facial coordinates of the video imagesof the two terminals.

In one embodiment of this application, the first terminal and the secondterminal can obtain the facial coordinates through any one of thefollowing manners:

For a first implementation, the participating terminals of videocommunication can respectively extract facial coordinates of their ownvideo images. This step may be: performing, by the first terminal,facial recognition on the video image of the first terminal, to obtain afacial coordinate of the video image of the first terminal; performing,by the second terminal, facial recognition on the video image of thesecond terminal, to obtain a facial coordinate of the video image of thesecond terminal; and transmitting, by the first terminal, the facialcoordinate of the video image of the first terminal to the secondterminal, so that the second terminal receives the facial coordinate ofthe video image of the first terminal, and the first terminal receivesthe facial coordinate, obtained by the second terminal through facialrecognition, of the video image of the second terminal.

The step of performing, by the first terminal, facial recognition on thevideo image of the first terminal, to obtain a facial coordinate of thevideo image of the first terminal can be: extracting, by the firstterminal, facial coordinates of all organs in the face from the videoimage of the first terminal through a preset facial recognitionalgorithm; obtaining a facial coordinate of an organ matching the firstpendant special effect from the extracted facial coordinates; and takingthe facial coordinate of the organ matching the first pendant specialeffect as the facial coordinate of the video image of the firstterminal. Certainly, the procedure of obtaining the facial coordinatethrough facial recognition may be further a procedure of roughlyrecognizing a facial contour, to obtain a facial coordinate used forrepresenting the facial contour. Because general locations of five senseorgans on the face are relatively fixed, the facial contour can be usedas a reference of adding the special effect, so that when the specialeffect is added, a calculation load of the terminal can be also reduced.

In a video chat session of the first terminal and the second terminal,the organ matching the first pendant special effect in the video imageof the first terminal may move, so that the facial coordinate of theorgan also changes accordingly. Therefore, the first terminal furtherneeds to update the facial coordinate in real time, and this procedurecan be: obtaining, by the first terminal, the facial coordinate of theorgan matching the first pendant special effect through the foregoingstep at intervals of a preset period; and taking the currently obtainedfacial coordinate as the facial coordinate of the video image of thefirst terminal. The preset period may be set and modified based on auser requirement. This is not specifically limited in one embodiment ofthis application. For example, the preset period may be 0.2 seconds,0.01 seconds or the like.

For a second implementation, the terminal extracts the facialcoordinates respectively through the video images of the two terminals.This step may be: respectively performing, by the first terminal, facialrecognition on the video images of the two terminals, to obtain thefacial coordinates of the video images of the two terminals. Theimplementation of this step is consistent with the implementation ofobtaining the facial coordinate of the video image of the first terminalin the first implementation, which is not described herein again.

307: The first terminal respectively adds the two pendant specialeffects to corresponding locations of the video images of the twoterminals based on the facial coordinates of the video images of the twoterminals.

In this step, that the first terminal adds the first pendant specialeffect to the video image of the first terminal is used as an example.The first terminal draws, on the video image of the first terminal, apendant special effect layer used for adding the first pendant specialeffect, and adds, in the pendant special effect layer, the first pendantspecial effect to a location of the facial coordinate according to thefacial coordinate of the organ matching the first pendant specialeffect, so that the first pendant special effect in the pendant specialeffect layer fits the organ matching the first pendant special effect.As shown in FIG. 5, by adding the two pendant special effects for thevideo images of the two terminals, the video communication interface ismore personalized, so that fun of video communication is improved.

In step 306, the first terminal updates the facial coordinates in realtime. Therefore, in this step, after adding the first pendant specialeffect to the pendant special effect layer, the first terminal furtheradjusts the first pendant special effect in real time. This procedurecan be: determining, by the first terminal at intervals of a presetperiod, whether the facial coordinate, obtained in a previous presetperiod, of the video image of the first terminal is the same as a facialcoordinate corresponding to a current preset period according to thefacial coordinate, obtained in the current preset period, of the videoimage of the first terminal. If not, the first terminal moves the firstpendant special effect to a location of the facial coordinatecorresponding to the current preset period, so that the first pendantspecial effect is in the location of the facial coordinate obtained inthe current preset period; and if yes, the first terminal performs noprocessing. In other words, current facial coordinates of the videoimages of the two terminals obtained in a current period is comparedwith previous facial coordinates of the video images of the twoterminals obtained in a previous period. Display locations of the twopendant special effects are moved according to the obtained facialcoordinates of the video images of the at least two terminals when thecurrent facial coordinates and the previous facial coordinates aredifferent. An implementation in which the first terminal adds the secondpendant special effect to the video image of the second terminal isconsistent with the foregoing implementation, which is not describedherein again.

In one embodiment of this application, when the first special effectdisplay instruction is the cross-subarea special effect instruction, thefirst special effect is the cross-subarea special effect, andcorrespondingly, a step that the first terminal adds the cross-subareaspecial effect for the video communication interface can be implementedthrough the following step 308.

308: The first terminal adds a special effect with a display effect ofmoving from a display subarea to another display subarea to the videoimages of the two terminals. In some embodiments, a beginning of themoving special effect is displayed at the first display subarea and isthe same for the multiple end special effects, and the target endspecial effect is displayed at the second display subarea.

In one embodiment of this application, the first terminal locallypre-stores a plurality of correspondences between the cross-subareaspecial effect instructions and the cross-subarea special effects. Thecross-subarea special effects include a directly displayed specialeffect and a special effect with a plurality of ends based on bodyactions.

When the cross-subarea special effect is the directly displayed specialeffect, this step may be: obtaining, by the first terminal according tothe cross-subarea special effect instruction, a specified moving trackof the cross-subarea special effect corresponding to the cross-subareaspecial effect instruction from the correspondences between thecross-subarea special effect instructions and the cross-subarea specialeffects, the specified moving track being moving from a subarea toanother subarea; drawing a cross-subarea special effect layer on thevideo image of the first terminal and the video image of the secondterminal; and displaying a moving special effect with a moving track ofmoving from a display subarea to another display subarea on thecross-subarea special effect layer according to the specified movingtrack. For example, the cross-subarea special effect is a gold coingiving special effect in which a plurality of gold coins moves from thefirst display subarea to the second display subarea.

The cross-subarea special effect may be a special effect used forreflecting interaction between communication participants, andtherefore, different display effects can be selected based on bodyactions of the participants. For example, when the cross-subarea specialeffect is the special effect with a plurality of ends based on the bodyactions, this step can be implemented through the following step 3081and step 3082.

3081: The first terminal adds a moving special effect with the displayeffect of moving from a display subarea to another display subarea tothe video images of the two terminals according to a moving trackparameter of the cross-subarea special effect.

In one embodiment of this application, the cross-subarea special effectsinclude a first displayed moving special effect and an end specialeffect based on the body actions feeding back the moving special effect.The moving track parameter of the cross-subarea special effect is usedfor indicating a moving track of the moving special effect in thecross-subarea special effect, and the moving track parameter includes,but is not limited to a moving track curve, a start point and an endpoint of a movement, or the like.

In this step, the first terminal obtains the moving track parametercorresponding to the cross-subarea special effect instruction accordingto the cross-subarea special effect instruction, and draws thecross-subarea special effect layer on the video image of the firstterminal and the video image of the second terminal. The first terminaldisplays a moving special effect that moves from a display subarea toanother display subarea according to the moving track curve on thecross-subarea special effect layer according to the moving trackparameter, or the first terminal displays a moving special effect thatmoves from the start point of the movement to the end point along astraight line according to the start point and the end point of themovement on the cross-subarea special effect layer according to themoving track parameter. The moving track curve and the start point andthe end point of the movement may be set and modified based on a userrequirement. This is not specifically limited in this embodiment of thisapplication.

For example, the start point of the movement may be a midpoint of acritical line of the first display subarea and the second displaysubarea, and the end point may be any point in an area in which the facein the second display subarea is located. The moving special effect maybe a boxing special effect in which a boxing graphic moves from thestart point to the area in which the face in the second display subareais located.

For example, the moving track curve may be a track curve from a bottomof the first display subarea to a bottom of the second display subarea,and a corresponding movement may be moving a balloon graphic from thebottom of the first display subarea to the bottom of the second displaysubarea.

In one embodiment of this application, the first terminal transmits across-subarea special effect display instruction to the second terminalthrough step 304, and the second terminal synchronously displays themoving special effect. Therefore, in a procedure in which the firstterminal displays the moving special effect, the user of the secondterminal may feed back the moving special effect from the first terminalby performing different body actions, thereby further improving fun ofinteraction in the video chat session.

3082: The first terminal selects, among multiple end special effects, atarget end special effect to be added to the video images of the twoterminals according to a body action occurred in the video image of thesecond terminal. The multiple end special effects indicate differentaction results of the first special effect corresponding to differentbody actions. For example, the first terminal may add different endspecial effects to the video images of the two terminals according todifferent body actions in the video image of the second terminal in adisplay procedure of the moving special effect, the second terminalbeing an action recipient in the special effect and each of the endspecial effects being used for indicating an action end of thecross-subarea special effect.

In one embodiment of this application, body actions of different userswho feed back the moving special effect are different. Therefore, in thedisplay procedure of the moving special effect, the first terminal mayadd different end special effects based on different body actions.

In this step, for each of the cross-subarea special effects, the firstterminal may store correspondences between different body actions andend special effects. Therefore, this step may be: determining, by thefirst terminal according to body actions in the video image of thesecond terminal as the action recipient in the special effect and thecorrespondences between the body actions and the end special effects, anend special effect corresponding to the body action in a procedure inwhich the first terminal displays the moving special effect, the endspecial effect being used for indicating an action end of thecross-subarea special effect; and displaying, by the first terminal, theend special effect corresponding to the body action on the cross-subareaspecial effect layer.

In one embodiment of this application, the first terminal may displaydifferent end special effects about whether to perform interaction inthe cross-subarea special effect based on whether the body action is apreset action. Specifically, this step may be: adding, by the firstterminal, a first end special effect for the video images of the twoterminals after an active time length of the moving special effect endsif the first terminal detects that there is the preset action in theanother display subarea, the first end special effect being used forindicating that the recipient performs interaction based on thecross-subarea special effect; and adding, by the first terminal, asecond end special effect for the video images of the two terminalsafter the active time length of the moving special effect ends if thefirst terminal detects that there is not the preset action in theanother display subarea, the second end special effect being used forindicating that the recipient does not perform interaction based on thecross-subarea special effect. The preset action may be an actiondetermined based on location changes of body organs in the seconddisplay subarea. For each cross-subarea special effect, each end specialeffect and a preset action corresponding to the end special effect arepre-stored in the first terminal. For example, the moving special effectin the cross-subarea special effect may be the boxing special effect inwhich a boxing graphic moves from the start point to the area in whichthe face in the second display subarea is located. The preset action maybe an action in which the face turns to one side.

Correspondingly, if detecting that there is the action in which the faceturns to one side in the second display subarea, the first terminaldetermines that the face in the video image of the second terminaldodges from the boxing graphic according to the action in which the faceturns to one side, that is, the recipient performs interaction based onthe cross-subarea special effect, and the first end special effect isadded to the video images of the two terminals. If detecting that thereis not the action in which the face turns to one side in the seconddisplay subarea, the first terminal determines that the face in thevideo image of the second terminal does not dodge from the boxinggraphic, that is, the recipient does not perform interaction based onthe cross-subarea special effect, and the second end special effect isadded to the video images of the two terminals.

Further, in one embodiment of this application, the end special effectin the cross-subarea special effect may include a graphic special effectand a sound effect. For example, as shown in FIG. 6, the second endspecial effect may include: adding a first graphic special effect ofsurprised or proud to the face of the video image of the first terminal,adding a second graphic special effect of closed eyes to the face of thevideo image of the second terminal, and playing a sound effect ofpainful screaming when the face is hit in the video communicationinterface. Additionally, when a body action of dodging (e.g., moving thebody to one side) is detected in the video image of the second terminal,the first graphic special effect may be a sad or defeated face, and thesecond graphic special effect may be a victory sign.

For example, the moving special effect in the cross-subarea specialeffect may be further a special effect in which a balloon graphic movesfrom the first display subarea to the second display subarea. The presetaction may be an action that the user of the second terminal taps theballoon graphic with a finger. When the first terminal detects thatthere is the action in which the balloon graphic is tapped by a fingerin the second display subarea in which the video image of the secondterminal is located, the first terminal determines that the usercorresponding to the second terminal as the recipient performsinteraction based on the cross-subarea special effect. The firstterminal obtains the first end special effect corresponding to a casethat interaction is performed based on the cross-subarea special effectfrom a plurality of end special effects of the cross-subarea specialeffect. When the first terminal detects that there is not the action inwhich the balloon graphic is tapped by a finger in the second displaysubarea in which the video image of the second terminal is located, thefirst terminal determines that the user corresponding to the secondterminal as the recipient does not perform interaction based on thecross-subarea special effect. The first terminal obtains the second endspecial effect corresponding to a case that interaction is not performedbased on the cross-subarea special effect from the plurality of endspecial effects of the cross-subarea special effect.

Further, in one embodiment of this application, the end special effectin the cross-subarea special effect may include a graphic special effectand a sound effect. For example, the first end special effect mayinclude: a graphic special effect that a victory gesture occurs in thesecond display subarea when the balloon is tapped, and a sound effectthat explosion of the balloon is played in the video communicationinterface.

When adding the end special effect, the first terminal actually detectsthe preset action according to the facial coordinate of the video imageof the second terminal; and the moving track of the moving specialeffect in the cross-subarea special effect may alternatively be relatedto the area in which the face is located. Therefore, in a procedure ofadding the cross-subarea special effect, the first terminal needs toobtain the facial coordinates of the video image of the first terminaland/or the video image of the second terminal, to detect whether thereis the preset action in the second display subarea or determine themoving track parameter of the moving special effect according to thefacial coordinate of the video image of the second terminal. Animplementation in which the first terminal needs to obtain the facialcoordinates of the video image of the first terminal and/or the videoimage of the second terminal is consistent with the implementation ofobtaining the facial coordinates that is used when the pendant specialeffect is added. This is not described herein again.

When the first terminal transmits the cross-subarea special effectinstruction to the second terminal, the cross-subarea special effectinstruction carries a special effect identifier. The second terminal maylocally store cross-subarea special effects corresponding to each of thecross-subarea special effect instructions, so that the second terminallocally obtains a cross-subarea special effect corresponding to thespecial effect identifier according to the special effect identifier inthe first special effect display instruction, adds the moving specialeffect, and adds different end special effects for the video images ofthe two terminals based on the different body actions in the video imageof the second terminal in the video communication interface of thesecond terminal, the second terminal being the action recipient in thespecial effect.

For the special effect with a plurality of ends based on the bodyactions in the cross-subarea special effects, as shown in FIG. 7, whenactually implemented, the foregoing procedure may logically include thefollowing steps a to f:

Step a: The first terminal first determines whether a configuration fileof the first special effect corresponding to the first special effectdisplay instruction is downloaded when the first terminal obtains thefirst special effect display instruction and before the first terminaladds the first special effect; if the configuration file is notdownloaded, the first terminal first locally downloads the configurationfile of the first special effect; and if the configuration file isdownloaded, step b is performed.

Step b: The first terminal reads the configuration file of the firstspecial effect according to the first special effect displayinstruction, and starts a timer.

Step c: Determine whether a trigger condition judgment needs to beperformed on the cross-subarea special effect, that is, determinewhether a current display manner in the video communication interface isthe split-screen display manner. If yes, the trigger condition judgmentneeds to be performed, and step d is performed. If not, end.

Step d: Display the moving special effect, and determine whether atrigger condition of the cross-subarea special effect is met based onthe body actions. If yes, the first end special effect is displayedbased on the body actions. If not, the second end special effect isdisplayed based on the body actions.

Step e: Determine whether a display time length of the first end specialeffect reaches a first special effect time length, or determine whethera display time length of the second end special effect reaches a secondspecial effect time length.

Step f: End when the display time length of the first end special effectreaches the first special effect time length; or, end when the displaytime length of the second end special effect reaches the second specialeffect time length.

In the foregoing procedure, detection of the preset action may berespectively and locally performed by the participating terminals in thevideo chat session, or may be performed by any one of the participatingterminals, and a detection result is notified to other terminals. Thismanner of performing detection by one terminal may ensure that bothparties can see a most complete and accurate effect, and significantlyreduce performance consumption.

Different cross-subarea special effects may correspond to differentpreset actions. In one embodiment of this application, different presetactions can be set according to actual display effects of thecross-subarea special effects, and a specific setting manner is notlimited.

In one embodiment of this application, the first terminal may furtherobtain a second special effect display instruction used for instructingto add the second special effect after adding the first special effect,and for the second special effect display instruction, the firstterminal may use any one of the following processing manners:

First processing manner: the first terminal only displays one specialeffect. That is, if obtaining the second special effect displayinstruction, the first terminal cancels the first special effect addedin the two display subareas, and adds the second special effectcorresponding to the second special effect display instruction for thetwo display subareas; and when a special effect active time length ofthe second special effect ends, adds the first special effect for thetwo display subareas again.

In one embodiment of this application, if obtaining the second specialeffect display instruction, the first terminal cancels the first specialeffect by clearing the first special effect on a first special effectlayer of the first special effect, or directly clearing the firstspecial effect layer.

If the first terminal stops drawing the first special effect on thefirst special effect layer, the first terminal directly draws the secondspecial effect corresponding to a second special effect instruction onthe first special effect layer. When detecting that the special effectactive time length of the second special effect ends, the first terminalobtains the first special effect corresponding to the first specialeffect display instruction again, and restores display of the firstspecial effect on the first special effect layer. If the first terminaldirectly clears the first special effect layer, the first terminaldraws, in the video image of the first terminal and the video image ofthe second terminal, a second special effect layer used for displayingthe second special effect. The first terminal adds the second specialeffect corresponding to the second special effect display instructionbased on the second special effect layer. An implementation thereof isconsistent with the implementation in which the first terminal adds thefirst special effect, which is not described herein again.

Then, when detecting that the special effect active time length of thesecond special effect ends, the first terminal clears the second specialeffect layer, draws the first special effect layer corresponding to thefirst special effect again, and adds the first special effect for thevideo image of the first terminal and the video image of the secondterminal again.

Second processing manner: the first terminal superimposes and displaysthe two special effects. That is, if obtaining the second special effectdisplay instruction, the first terminal superimposes the second specialeffect corresponding to the second special effect display instructionfor the two display subareas in which the first special effect is added.

In one embodiment of this application, if obtaining the second specialeffect display instruction, the first terminal superimposes the secondspecial effect layer on the first special effect layer, obtains thesecond special effect corresponding to the second special effect displayinstruction, and displays the second special effect on the secondspecial effect layer, to display the first special effect and the secondspecial effect at the same time, or the first terminal may further drawthe second special effect on the first special effect layer, tosuperimpose and display the special effects.

In one embodiment of this application, in a procedure of performingdisplay through a split-screen display manner, the first terminalcancels the split-screen display. This step may include: obtaining, bythe first terminal, a split-screen cancelation instruction of the firstterminal, and displaying the video images of the two terminals through amanner of big and small pictures. In this step, the split-screencancelation instruction is used for instructing the first terminal tointerrupt the split-screen display manner, and display the video imagesof the two terminals through the manner of big and small pictures. Themanner of big and small pictures is: the first terminal displays thevideo image of the first terminal in full screen, and displays the videoimage of the second terminal in a small size in a rectangular area in anupper right corner of the video communication interface. The firstterminal may trigger the split-screen cancelation instruction through asplit-screen cancelation button. In a case that the first terminaldetects that the split-screen cancelation button in the videocommunication interface is triggered, the first terminal obtains thesplit-screen cancelation instruction; displays every frame of videoimage in first video data of the first terminal in the videocommunication interface in full screen; adjusts every frame of videoimage in second video data of the second terminal according to a size ofthe rectangular area; and displays the adjusted video image in therectangular area.

In one embodiment of this application, video images of differentterminals are displayed by dividing a video communication interface intoa plurality of subareas that are not overlapped, which breaks through alimitation of pictures, so that in a case that a special effect isadded, the special effect can be added in the plurality of subareas, anda sense of interaction is enhanced by adding the special effect, whichprevents a waste of network resources of video communication, therebygreatly improving actual efficiency of video communication.

Further, by adding the special effects by using configured specialeffect parameters in the terminals locally, the special effects aredisplayed in the terminals, so that data in the interaction is greatlyreduced, and a normal parsing of the video is not affected. In addition,in the foregoing video chat session, information such as the video andthe facial coordinates is only exchanged in the video chat session,which reduces the performance consumption. In an entire implementationprocedure of the special effect, interruption and restoration of thespecial effect are further supported. A new special effect can interruptdisplay of a current special effect, and a previous special effect mayneed to be restored after the current special effect ends, so that eachinteraction is complete, thereby ensuring a best user experience.

FIG. 8 is a schematic structural diagram of a video communicationsapparatus according to an embodiment of this application. The apparatusis applied to a first terminal. Referring to FIG. 8, the apparatusincludes: a display module 801, a first obtaining module 802, a firstadding module 803 and a transmitting module 804.

The display module 801 is configured to respectively display videoimages of at least two terminals in at least two display subareas of avideo communication interface in a video chat session of the at leasttwo terminals, the display subareas being not overlapped with eachother. The at least two terminals includes the first terminal, and eachdisplay subarea displays a video image from one of the at least twoterminals.

The first obtaining module 802 is configured to obtain a first specialeffect display instruction, the first special effect display instructionbeing used for instructing to add a first special effect for the atleast two display subareas.

The first adding module 803 is configured to add the first specialeffect to the at least two display subareas based on the first specialeffect display instruction.

The transmitting module 804 is configured to transmit the first specialeffect display instruction to a second terminal of the at least twoterminals. In some embodiments, the second terminal being an actionrecipient of the first special effect. In some embodiments, theapparatus is further configured to: select, among multiple end specialeffects, a target end special effect to be added to the video images ofthe at least two terminals according to a body action occurred in thevideo image of the second terminal, the multiple end special effectsindicating different action results of the first special effectcorresponding to different body actions

Optionally, the apparatus further includes:

a second obtaining module, configured to obtain a split-screen displayinstruction triggered in the first terminal or transmitted by any secondterminal; and in response to the split-screen display instruction,respectively displaying, by the first terminal, the video images of theat least two terminals in the at least two display subareas.

Optionally, the first adding module 803 includes:

a first obtaining unit, configured to obtain at least two pendantspecial effects corresponding to a pendant special effect instruction;

a second obtaining unit, configured to obtain facial coordinates of thevideo images of the at least two terminals; and

a first adding unit, configured to respectively add the at least twopendant special effects to corresponding locations of the video imagesof the at least two terminals based on the facial coordinates of thevideo images of the at least two terminals. In some embodiments, eachpendant special effect corresponds to one of the at least two displaysubareas.

Optionally, the second obtaining unit includes:

a first recognition subunit, configured to respectively perform facialrecognition on the video images of the at least two terminals, to obtainthe facial coordinates of the video images of the at least twoterminals; or

a second recognition subunit, configured to perform facial recognitionon a video image of the first terminal, to obtain a facial coordinate ofthe video image of the first terminal, and receive a facial coordinateof a video image of the at least one second terminal, the facialcoordinate being obtained by the at least one second terminal throughfacial recognition.

Optionally, in a case that the first special effect display instructionis a cross-subarea special effect instruction, the first special effectis a cross-subarea special effect displayed across the at least twodisplay subareas. The cross-subarea special effect may include effectsdisplayed across the at least two display subareas.

the first adding module 803 is further configured to add a specialeffect with a display effect of moving from a display subarea to anotherdisplay subarea to the video images of the at least two terminals.

Optionally, the first adding module 803 includes:

a second adding unit, configured to add a moving special effect with thedisplay effect of moving from a first display subarea to a seconddisplay subarea to the video images of the at least two terminalsaccording to a moving track parameter of the cross-subarea specialeffect; and

optionally, a third adding unit, configured to add different end specialeffects to the video images of the at least two terminals according todifferent body actions in the video image of the second terminal in adisplay procedure of the moving special effect, the second terminalbeing an action recipient in the special effect and each of the endspecial effects being used for indicating an action end of thecross-subarea special effect.

Optionally, the third adding unit includes:

a first adding subunit, configured to add a first end special effect tothe video images of the at least two terminals after an active timelength of the moving special effect ends in a case that it is detectedthat there is a preset action in the another display subarea, the firstend special effect being used for indicating that a recipient performsinteraction based on the cross-subarea special effect; and

a second adding subunit, configured to add a second end special effectto the video images of the at least two terminals after an active timelength of the moving special effect ends in a case that it is detectedthat there is no preset action in the another display subarea, thesecond end special effect being used for indicating that the recipientdoes not perform interaction based on the cross-subarea special effect.For example, after an active time length of the moving special effectends, a first end special effect is added to the video images of the atleast two terminals if a first body action in the second display subareais detected when displaying of the moving special effect, the first endspecial effect indicating that the action recipient performs interactionbased on the cross-subarea special effect; and after the active timelength of the moving special effect ends, a second end special effect isadded to the video images of the at least two terminals if no bodyaction is detected in the second display subarea, the second end specialeffect being indicating that the recipient does not perform interactionbased on the cross-subarea special effect.

Optionally, the apparatus further includes:

a cancelation module, configured to cancel the first special effectadded in the at least two display subareas in a case that a secondspecial effect display instruction is obtained;

a second adding module, configured to add a second special effectcorresponding to the second special effect display instruction for theat least two display subareas; and a third adding module, configured toadd the first special effect for the at least two display subareas againin a case that an active time length of the second special effect ends.

Optionally, the apparatus further includes:

a superposing module, configured to superimpose the second specialeffect corresponding to the second special effect display instructionfor the at least two display subareas in which the first special effectis added in a case that the second special effect display instruction isobtained.

Optionally, the apparatus further includes:

a third obtaining module, configured to obtain a split-screencancelation instruction of the first terminal, and display the videoimages of the at least two terminals through a manner of big and smallpictures. For example, one of the video images of the at least twoterminals is displayed in full screen and another one of the videoimages of the at least two terminals is displayed overlapping a subareaof the full screen.

Optionally, the first obtaining module 802 includes:

a third obtaining unit, configured to add a second special effectcorresponding to a specified gesture upon detecting the specifiedgesture in both the video images displayed in the at least two displaysubareas, the gesture special effect instruction being used forinstructing to add a special effect corresponding to the specifiedgesture for the video images displayed in the at least two displaysubareas; or

a fourth obtaining unit, configured to add a third special effectcorresponding to a specified emotion upon detecting the specifiedemotion in any one of the video images displayed in the at least twodisplay subareas, the emotion special effect instruction correspondingto the specified emotion being used for instructing to add a specialeffect corresponding to the specified emotion for the video imagesdisplayed in the at least two display subareas.

Through the apparatus provided in one embodiment of this application,video images of different terminals are displayed by dividing a videocommunication interface into a plurality of subareas that are notoverlapped, which breaks through a limitation of pictures, so that in acase that a special effect is added, the special effect can be added inthe plurality of subareas, and a sense of interaction is enhanced byadding the special effect, which prevents a waste of network resourcesof video communication, thereby greatly improving actual efficiency ofvideo communication.

Further, by adding the special effects by using configured specialeffect parameters in the terminals locally, the special effects aredisplayed in the terminals, so that data in the interaction is greatlyreduced, and a normal parsing of the video is not affected. In addition,in the foregoing video chat session, information such as the video andthe facial coordinates is only exchanged in the video chat session,which reduces the performance consumption. In an entire implementationprocedure of the special effect, interruption and restoration of thespecial effect are further supported. A new special effect can interruptdisplay of a current special effect, and a previous special effect mayneed to be restored after the current special effect ends, so that eachinteraction is complete, thereby ensuring a best user experience.

Any combination of the foregoing optional technical solutions may beused to obtain an optional embodiment of the present disclosure. Detailsare not described herein.

The above functional modules are only described for exemplary purposeswhen the video communications apparatus provided by the foregoingembodiments performs video communication. In actual applications, thefunctions may be allocated to different functional modules according tospecific needs, which means that the internal structure of the apparatusis divided to different functional modules to complete all or some ofthe above functions. In addition, the video communications apparatusprovided in the foregoing embodiment belongs to the same conception asthe embodiment of the video communications method. Refer to the methodembodiment for details of the specific implementation process, which isnot described herein again.

FIG. 9 is a schematic structural diagram of a terminal according to anembodiment of this application. The terminal may be configured toimplement the functions of the terminal in the video communicationsmethod in the foregoing embodiments. Specifically:

A terminal 900 may include components such as a radio frequency (RF)circuit 110, a memory 120 including one or more computer readablestorage media, an input unit 130, a display unit 140, a sensor 150, anaudio circuit 160, a transmission module 170, a processor 180 includingone or more processing cores, and a power supply 190. A person skilledin the technology may understand that the structure of the terminalshown in FIG. 9 does not constitute a limitation to the terminal, andthe terminal may include more or fewer components than those shown inthe figure, or some components may be combined, or a different componentdeployment may be used.

The RF circuit 110 may be configured to receive and transmit signalsduring an information receiving and transmitting process or a callprocess. Particularly, the RF circuit 110 receives downlink informationfrom a base station, then delivers the downlink information to the oneor more processors 180 for processing, and transmits related uplink datato the base station. Generally, the RF circuit 110 includes, but is notlimited to, an antenna, at least one amplifier, a tuner, one or moreoscillators, a subscriber identity module (SIM) card, a transceiver, acoupler, a low noise amplifier (LNA), a duplexer, and the like. Inaddition, the RF circuit 110 may also communicate with a network andanother terminal by wireless communication. The wireless communicationmay use any communications standard or protocol, which includes, but isnot limited to, GSM (Global System for Mobile communications), GPRS(General Packet Radio Service), CDMA (Code Division Multiple Access),WCDMA (Wideband Code Division Multiple Access), LTE (Long TermEvolution), e-mail, SMS (Short Messaging Service), and the like.

The memory 120 may be configured to store a software program and amodule, for example, a program instruction and a module corresponding toa terminal shown in the foregoing exemplary embodiments, and theprocessor 180 performs various functional applications and dataprocessing by running the software program and the module stored in thememory 120, for example, implements video-based interaction. The memory120 may mainly include a program storage area and a data storage area.The program storage area may store an operating system, an applicationprogram required by at least one function (such as a sound playbackfunction and an image display function), and the like. The data storagearea may store data (such as audio data and an address book) createdaccording to use of the terminal 900, and the like. In addition, thememory 120 may include a high speed random access memory, and may alsoinclude a non-volatile memory such as at least one magnetic disk storagedevice, a flash memory, or another volatile solid-state storage device.Correspondingly, the memory 120 may further include a memory controller,to provide access of the processor 180 and the input unit 130 to thememory 120.

The input unit 130 may be configured to: receive input digit orcharacter information, and generate a keyboard, mouse, joystick,optical, or track ball signal input related to the user setting andfunction control. Specifically, the input unit 130 may include atouch-sensitive surface 131 and another input terminal 132. Thetouch-sensitive surface 131, which is also referred to as a touchscreenor a touch panel, may collect a touch operation of a user on or near thetouch-sensitive surface (such as an operation that is performed by auser on or near the touch-sensitive surface 131 by using any suitableobject or accessory, such as a finger or a stylus), and drive acorresponding connection apparatus according to a preset program.Optionally, the touch-sensitive surface 131 may include two parts: atouch detection apparatus and a touch controller. The touch detectionapparatus detects a touch position of the user, detects a signalgenerated by the touch operation, and transfers the signal to the touchcontroller. The touch controller receives the touch information from thetouch detection apparatus, converts the touch information into touchpoint coordinates, and transmits the touch point coordinates to theprocessor 180. Moreover, the touch controller can receive and execute acommand transmitted from the processor 180. In addition, thetouch-sensitive surface 131 may be a resistive, capacitive, infrared, orsurface acoustic wave type touch-sensitive surface. In addition to thetouch-sensitive surface 131, the input unit 130 may further include theanother input terminal 132. Specifically, the another input terminal 132may include, but is not limited to, one or more of a physical keyboard,a functional key (such as a volume control key or a switch key), a trackball, a mouse, and a joystick.

The display unit 140 may be configured to display information entered bythe user or information provided for the user, and various graphicaluser interfaces of the terminal 900. These graphical user interfaces maybe formed by a graph, a text, an icon, a video, or any combinationthereof. The display unit 140 may include a display panel 141.Optionally, the display panel 141 may be configured by using a liquidcrystal display (LCD), an organic light-emitting diode (OLED), or thelike. Further, the touch-sensitive surface 131 may cover the displaypanel 141. After detecting a touch operation on or near thetouch-sensitive surface 131, the touch-sensitive surface 131 transfersthe touch operation to the processor 180, so as to determine the type ofthe touch event. Then, the processor 180 provides a corresponding visualoutput on the display panel 141 according to the type of the touchevent. Although in FIG. 9, the touch-sensitive surface 131 and thedisplay panel 141 are used as two separate parts to implement input andoutput functions, in some embodiments, the touch-sensitive surface 131and the display panel 141 may be integrated to implement the input andoutput functions.

The terminal 900 may further include at least one sensor 150, forexample, an optical sensor, a motion sensor, and other sensors.Specifically, the optical sensor may include an ambient light sensor anda proximity sensor. The ambient light sensor may adjust luminance of thedisplay panel 141 according to brightness of the ambient light. Theproximity sensor may switch off the display panel 141 and/or backlightwhen the terminal device 400 is moved to the ear. As one type of themotion sensor, a gravity acceleration sensor may detect a value ofacceleration at each direction (which generally is triaxial), may detecta value and a direction of the gravity when being static, and may beconfigured to identify an application of a mobile phone gesture (such asa handover between horizontal and longitudinal screens, a related game,and gesture calibration of a magnetometer), a related function ofvibration identification (such as a pedometer and a knock), and thelike. Another sensor, such as a gyroscope, a barometer, a hygrometer, athermometer, and an infrared sensor, which can be configured in theterminal 900 is not described herein again.

The audio circuit 160, a loudspeaker 161, and a microphone 162 mayprovide audio interfaces between the user and the terminal 900. Theaudio circuit 160 may transmit, to the loudspeaker 161, an electricsignal converted from received audio data. The loudspeaker 161 convertsthe electric signal into a sound signal for output. On the other hand,the microphone 162 converts a collected sound signal into an electricsignal. The audio circuit 160 receives the electric signal and convertsthe electric signal into audio data, and outputs the audio data to theprocessor 180 for processing. Then, the processor 180 transmits theaudio data to, for example, another terminal by using the RF circuit110, or outputs the audio data to the memory 120 for further processing.The audio circuit 160 may further include an earplug jack, to providecommunication between a peripheral earphone and the terminal 900.

The terminal 900 may help, by using the transmission module 170, a userto receive and transmit an email, browse a web page, and access streammedia, and the like, which provides wireless or wired broadband Internetaccess for the user. Although FIG. 9 shows the transmission module 170,it may be understood that the transmission module 170 is not a necessarycomponent of the terminal 900, and when required, transmission module170 may be omitted as long as the scope of the essence of the presentdisclosure is not changed.

The processor 180 is a control center of the terminal 900, is connectedto various parts of the entire mobile phone by using various interfacesand lines, and by running or executing a software program and/or modulestored in the memory 120 and invoking data stored in the memory 120,perform various functions of the terminal 900 and process data, so as toperform overall monitoring on the mobile phone. Optionally, theprocessor 180 may include one or more processor cores. Preferably, theprocessor 180 may integrate an application processor and a modem. Theapplication processor mainly processes an operating system, a userinterface, an application program, and the like. The modem mainlyprocesses wireless communication. It may be understood that theforegoing modem processor may not be integrated into the processor 180.

The terminal 900 further includes the power supply 190 (such as abattery) for supplying power to the components. Preferably, the powersupply may be logically connected to the processor 180 by using a powermanagement system, thereby implementing functions such as charging,discharging, and power consumption management by using the powermanagement system. The power supply 190 may further include one or moreof a direct current or alternating current power supply, a re-chargingsystem, a power failure detection circuit, a power supply converter orinverter, a power supply state indicator, and any other component.

Although not shown in the figure, the terminal 900 may further include acamera, a Bluetooth module, and the like, and details are not describedherein. Specifically, in one embodiment, the display unit of theterminal 900 is a touchscreen display, and the terminal 900 furtherincludes a memory and one or more programs. The one or more programs arestored in the memory, and are configured to be executed by one or moreprocessors to execute instructions, included in the foregoing one ormore programs, used to perform the operations performed by the terminalin the foregoing embodiments.

In an exemplary embodiment, a computer readable storage medium storing acomputer program is further provided, for example, a memory storing acomputer program. The computer program, when executed by a processor,implements the video communications method in the foregoing embodiment.For example, the computer readable storage medium may be a read-onlymemory (ROM), a random access memory (RAM), a compact disc read-onlymemory (CD-ROM), a magnetic tape, a floppy disk, an optical data storagedevice, or the like.

A person of ordinary skill in the art may understand that all or some ofthe steps of the embodiments may be implemented by hardware or a programinstructing related hardware. The program may be stored in acomputer-readable storage medium. The storage medium may include aread-only memory, a magnetic disk, or an optical disc.

The foregoing descriptions are merely preferred embodiments of thisapplication, but are not intended to limit this application. Anymodification, equivalent replacement, or improvement made within thespirit and principle of this application shall fall within theprotection scope of this application.

What is claimed is:
 1. A video communications method, applied to a firstterminal, the method comprising: respectively displaying video images ofat least two terminals in at least two display subareas of a videocommunication interface in a video chat session of the at least twoterminals, wherein the at least two terminals includes the firstterminal, and each display subarea displays a video image from one ofthe at least two terminals; obtaining a first special effect displayinstruction; adding a first special effect to the at least two displaysubareas based on the first special effect display instruction;transmitting the first special effect display instruction to a secondterminal of the at least two terminals, the second terminal being anaction recipient of the first special effect; and selecting, amongmultiple end special effects, a target end special effect to be added tothe video images of the at least two terminals according to a bodyaction occurred in the video image of the second terminal, the multipleend special effects indicating different action results of the firstspecial effect corresponding to different body actions.
 2. The methodaccording to claim 1, further comprising: obtaining a split-screendisplay instruction triggered in the first terminal or transmitted byany second terminal; and in response to the split-screen displayinstruction, respectively displaying, by the first terminal, the videoimages of the at least two terminals in the at least two displaysubareas.
 3. The method according to claim 1, further comprising:obtaining at least two pendant special effects corresponding to apendant special effect instruction; obtaining facial coordinates of thevideo images of the at least two terminals; and respectively adding theat least two pendant special effects to corresponding locations of thevideo images of the at least two terminals based on the facialcoordinates of the video images of the at least two terminals, eachpendant special effect corresponding to one of the at least two displaysubareas.
 4. The method according to claim 3, wherein adding the atleast two pendant special effects to the at least two display subareasfurther comprising: comparing current facial coordinates of the videoimages of the at least two terminals obtained in a current period withprevious facial coordinates of the video images of the at least twoterminals obtained in a previous period; and moving display locations ofthe at least two pendant special effects according to the obtainedfacial coordinates of the video images of the at least two terminalswhen the current facial coordinates and the previous facial coordinatesare different.
 5. The method according to claim 3, wherein obtainingfacial coordinates of the video images of the at least two terminalscomprising: respectively performing facial recognition on the videoimages of the at least two terminals, to obtain the facial coordinatesof the video images of the at least two terminals; or performing facialrecognition on a video image of the first terminal, to obtain a facialcoordinate of the video image of the first terminal, and receiving afacial coordinate of a video image of the at least one second terminal,the facial coordinate being obtained by the at least one second terminalthrough facial recognition.
 6. The method according to claim 1, whereinthe first special effect display instruction is a cross-subarea specialeffect instruction, the first special effect being a cross-subareaspecial effect; and adding the first special effect to the at least twodisplay subareas comprises: adding a special effect of moving from adisplay subarea to another display subarea to the video images of the atleast two terminals.
 7. The method according to claim 6, wherein addinga special effect of moving from a display subarea to another displaysubarea to the video images of the at least two terminals comprises:adding a moving special effect of moving from a first display subarea toa second display subarea to the video images of the at least twoterminals according to a moving track parameter of the cross-subareaspecial effect.
 8. The method according to claim 7, further comprising:after an active time length of the moving special effect ends, adding afirst end special effect to the video images of the at least twoterminals if a first body action in the second display subarea isdetected when displaying of the moving special effect, the first endspecial effect indicating that the action recipient performs interactionbased on the cross-subarea special effect; and adding a second endspecial effect to the video images of the at least two terminals if nobody action is detected in the second display subarea, the second endspecial effect being indicating that the recipient does not performinteraction based on the cross-subarea special effect.
 9. The methodaccording to claim 1, after the adding the first special effect for theat least two display subareas, further comprising: canceling the firstspecial effect added in the at least two display subareas in response toobtaining a second special effect display instruction; adding a secondspecial effect corresponding to the second special effect displayinstruction to the at least two display subareas; and adding the firstspecial effect for the at least two display subareas again when anactive time length of the second special effect ends.
 10. The methodaccording to claim 2, further comprising: obtaining a split-screencancelation instruction of the first terminal, and displaying one of thevideo images of the at least two terminals in full screen and displayinganother one of the video images of the at least two terminalsoverlapping a subarea of the full screen.
 11. The method according toclaim 1, the obtaining a first special effect display instructioncomprising: adding a second special effect corresponding to a specifiedgesture upon detecting the specified gesture in both the video imagesdisplayed in the at least two display subareas; or adding a thirdspecial effect corresponding to a specified emotion upon detecting thespecified emotion in any one of the video images displayed in the atleast two display subareas.
 12. The method according to claim 1, whereinobtaining a first special effect display instruction comprising:generating the first special effect display instruction according to avoice instruction.
 13. The method according to claim 1, before addingthe first special effect for the at least two display subareas, furthercomprising: detecting whether a configuration file is stored in thefirst terminal, the configuration file being used for configuring thefirst special effect corresponding to the first special effect displayinstruction; and downloading the configuration file to the firstterminal upon detecting that the configuration file is not stored in thefirst terminal.
 14. A first terminal comprising a processor and amemory, the memory storing at least one instruction for being executedby the processor to perform: respectively displaying video images of atleast two terminals in at least two display subareas of a videocommunication interface in a video chat session of the at least twoterminals, wherein the at least two terminals includes the firstterminal, and each display subarea displays a video image from one ofthe at least two terminals; obtaining a first special effect displayinstruction; adding a first special effect to the at least two displaysubareas based on the first special effect display instruction;transmitting the first special effect display instruction to a secondterminal of the at least two terminals, the second terminal being anaction recipient of the first special effect; and selecting, amongmultiple end special effects, a target end special effect to be added tothe video images of the at least two terminals according to a bodyaction occurred in the video image of the second terminal, the multipleend special effects indicating different action results of the firstspecial effect corresponding to different body actions.
 15. The terminalaccording to claim 14, wherein the first special effect displayinstruction is a cross-subarea special effect instruction, the firstspecial effect being a cross-subarea special effect; and adding thefirst special effect to the at least two display subareas comprises:adding a special effect of moving from a display subarea to anotherdisplay subarea to the video images of the at least two terminals. 16.The terminal according to claim 15, wherein adding a special effect ofmoving from a display subarea to another display subarea to the videoimages of the at least two terminals comprises: adding a moving specialeffect of moving from a first display subarea to a second displaysubarea to the video images of the at least two terminals according to amoving track parameter of the cross-subarea special effect.
 17. Theterminal according to claim 16, wherein the processor is furtherconfigured to perform: after an active time length of the moving specialeffect ends, adding a first end special effect to the video images ofthe at least two terminals if a first body action in the second displaysubarea is detected when displaying of the moving special effect, thefirst end special effect indicating that the action recipient performsinteraction based on the cross-subarea special effect; and adding asecond end special effect to the video images of the at least twoterminals if no body action is detected in the second display subarea,the second end special effect being indicating that the recipient doesnot perform interaction based on the cross-subarea special effect. 18.The terminal according to claim 14, wherein the processor is furtherconfigured to perform: after the adding the first special effect for theat least two display subareas, canceling the first special effect addedin the at least two display subareas in response to obtaining a secondspecial effect display instruction; adding a second special effectcorresponding to the second special effect display instruction to the atleast two display subareas; and adding the first special effect for theat least two display subareas again when an active time length of thesecond special effect ends.
 19. The terminal according to claim 14,wherein the processor is further configured to perform: obtaining asplit-screen display instruction triggered in the first terminal ortransmitted by any second terminal; in response to the split-screendisplay instruction, respectively displaying, by the first terminal, thevideo images of the at least two terminals in the at least two displaysubareas.
 20. A non-transitory computer-readable storage medium, storingat least one instruction, the instruction being loaded and executed by aprocessor of a first terminal to perform: respectively displaying videoimages of at least two terminals in at least two display subareas of avideo communication interface in a video chat session of the at leasttwo terminals, wherein the at least two terminals includes the firstterminal, and each display subarea displays a video image from one ofthe at least two terminals; obtaining a first special effect displayinstruction; adding a first special effect to the at least two displaysubareas based on the first special effect display instruction;transmitting the first special effect display instruction to a secondterminal of the at least two terminals, the second terminal being anaction recipient of the first special effect; and selecting, amongmultiple end special effects, a target end special effect to be added tothe video images of the at least two terminals according to a bodyaction occurred in the video image of the second terminal, the multipleend special effects indicating different action results of the firstspecial effect corresponding to different body actions.